//
//  AboutViewController.m
//  ITHome
//
//  Created by lanou3g on 15/7/16.
//  Copyright (c) 2015年 YAX. All rights reserved.
//

#import "AboutViewController.h"

@interface AboutViewController ()

@end

@implementation AboutViewController


- (void)viewDidLoad
{
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor RGBColor:239 green:239 blue:244 alpha:1];
    [self loadNavigationIndfo];
    [self loadContentView];
}

- (void)loadContentView
{
    UIImageView *iconImageView = [[UIImageView alloc] initWithFrame:CGRectMake(kScreenWidth/2-100, kScreenHeight/2 -150, 200, 200)];
    iconImageView.image = [UIImage imageNamed:@"杨戬大图2"];
    [self.view addSubview:iconImageView];
    
    UILabel *titleLable = [[UILabel alloc] initWithFrame:CGRectMake((kScreenWidth - kScreenWidth/4*3 )/2 , iconImageView.y + iconImageView.height + 10, kScreenWidth/4*3, 30)];
    titleLable.text = @"当前版本：1.0（A8421）";
    titleLable.font = [UIFont systemFontOfSize:13];
    titleLable.textAlignment = NSTextAlignmentCenter;
//    titleLable.backgroundColor = [UIColor randomColor];
    [self.view addSubview:titleLable];
}

#pragma mark - 设置导航栏
- (void)loadNavigationIndfo
{
    self.navigationController.navigationBar.barTintColor = [UIColor RGBColor:71 green:128 blue:208 alpha:1];
    
    self.navigationItem.title = @"关于";
    // 返回
    UIBarButtonItem *leftBackButton = [UIBarButtonItem itemWithTarget:self Action:@selector(backAction) image:@"home_back" highImage:@"home_back_highlighted"];
    self.navigationItem.leftBarButtonItem = leftBackButton;
    
    // 标题
    [[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
}



#pragma mark - 返回按钮触发事件
- (void)backAction
{
    [self dismissViewControllerAnimated:YES completion:nil];
}

#pragma mark - 内容警告触发方法
- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    [[SDImageCache sharedImageCache] clearMemory];
}

@end
